Shared libraries

In [6]:
ldd /bin/sed
	linux-vdso.so.1 =>  (0x00007fff0e3d3000)
	libselinux.so.1 => /lib/x86_64-linux-gnu/libselinux.so.1 (0x00007f1e5b2a6000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f1e5aedd000)
	libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f1e5ac6c000)
	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f1e5aa68000)
	/lib64/ld-linux-x86-64.so.2 (0x000055c05c594000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f1e5a84b000)
In [14]:
ldd /bin/grep
	linux-vdso.so.1 =>  (0x00007fff6d679000)
	libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007fb2a15aa000)
	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fb2a13a6000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fb2a0fdc000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fb2a0dbf000)
	/lib64/ld-linux-x86-64.so.2 (0x0000565096858000)
In [35]:
whatis pmap
pmap (1)             - report memory map of a process
In [51]:
pmap $$ | grep -o "lib.*\.so" | sort | uniq
libc-2.23.so
libdl-2.23.so
libnsl-2.23.so
libnss_compat-2.23.so
libnss_files-2.23.so
libnss_nis-2.23.so
libtinfo.so

Config file:

In [6]:
cat /etc/ld.so.conf
include /etc/ld.so.conf.d/*.conf

Cache: /etc/ld.so.cache

Show cache:

In [2]:
ldconfig -p | head
999 libs found in cache `/etc/ld.so.cache'
	libzvbi.so.0 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libzvbi.so.0
	libzvbi-chains.so.0 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libzvbi-chains.so.0
	libzmq.so.5 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libzmq.so.5
	libzltext.so.0.13 (libc6,x86-64) => /usr/lib/libzltext.so.0.13
	libzlcore.so.0.13 (libc6,x86-64) => /usr/lib/libzlcore.so.0.13
	libzeitgeist-2.0.so.0 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libzeitgeist-2.0.so.0
	libz.so.1 (libc6,x86-64) => /lib/x86_64-linux-gnu/libz.so.1
	libyelp.so.0 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libyelp.so.0
	libyaml-0.so.2 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libyaml-0.so.2
sudo ldconfig

Lecture notes

License

Creative Commons License

Linux Notes by Milad As (Ravexina) is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.


ravexina's gitlab

ravexina's github